package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TbUserDutyId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbUserDutyId implements java.io.Serializable {

	// Fields

	private short udId;
	private String udName;
	private String udDescrible;
	private Integer corpId;

	// Constructors

	/** default constructor */
	public TbUserDutyId() {
	}

	/** minimal constructor */
	public TbUserDutyId(short udId) {
		this.udId = udId;
	}

	/** full constructor */
	public TbUserDutyId(short udId, String udName, String udDescrible,
			Integer corpId) {
		this.udId = udId;
		this.udName = udName;
		this.udDescrible = udDescrible;
		this.corpId = corpId;
	}

	// Property accessors

	@Column(name = "ud_id", nullable = false)
	public short getUdId() {
		return this.udId;
	}

	public void setUdId(short udId) {
		this.udId = udId;
	}

	@Column(name = "ud_name", length = 50)
	public String getUdName() {
		return this.udName;
	}

	public void setUdName(String udName) {
		this.udName = udName;
	}

	@Column(name = "ud_describle", length = 200)
	public String getUdDescrible() {
		return this.udDescrible;
	}

	public void setUdDescrible(String udDescrible) {
		this.udDescrible = udDescrible;
	}

	@Column(name = "corp_id")
	public Integer getCorpId() {
		return this.corpId;
	}

	public void setCorpId(Integer corpId) {
		this.corpId = corpId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbUserDutyId))
			return false;
		TbUserDutyId castOther = (TbUserDutyId) other;

		return (this.getUdId() == castOther.getUdId())
				&& ((this.getUdName() == castOther.getUdName()) || (this
						.getUdName() != null && castOther.getUdName() != null && this
						.getUdName().equals(castOther.getUdName())))
				&& ((this.getUdDescrible() == castOther.getUdDescrible()) || (this
						.getUdDescrible() != null
						&& castOther.getUdDescrible() != null && this
						.getUdDescrible().equals(castOther.getUdDescrible())))
				&& ((this.getCorpId() == castOther.getCorpId()) || (this
						.getCorpId() != null && castOther.getCorpId() != null && this
						.getCorpId().equals(castOther.getCorpId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + this.getUdId();
		result = 37 * result
				+ (getUdName() == null ? 0 : this.getUdName().hashCode());
		result = 37
				* result
				+ (getUdDescrible() == null ? 0 : this.getUdDescrible()
						.hashCode());
		result = 37 * result
				+ (getCorpId() == null ? 0 : this.getCorpId().hashCode());
		return result;
	}

}